package com.zsck.pos.base;

import android.app.Activity;
import android.content.ComponentName;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;

import androidx.annotation.Nullable;

import com.google.gson.Gson;
import com.trello.rxlifecycle2.components.support.RxAppCompatActivity;
import com.chinaums.commoncheck.R;
import com.zsck.pos.common.ActivityManager;
import com.zsck.pos.common.Code;
import com.zsck.pos.dialog.DialogManager;
import com.zsck.pos.utils.GsonManager;
import com.zsck.pos.utils.LogUtil;
import com.zsck.pos.utils.ScreenUtils;

/**
 * 创建者     Bowllboy
 * 创建时间   2020/4/23 10:16
 * 描述	      ${TODO}
 */
public class BaseActivity extends RxAppCompatActivity {
    public static Gson gson = GsonManager.getGsonInstance();
    public Handler mHandler;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        ActivityManager.getInstance().addActivity(this);
        LogUtil.i(getClass().getSimpleName(), getClass().getSimpleName() + "当前Activity总数" + ActivityManager.getInstance().getActivityList().size());
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        ActivityManager.getInstance().destoryActivity(this, false)  ;
    }



}
